import request from '@/utils/request'

// 查询充电订单信息列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}

// 查询充电订单信息详细
export function getOrder(oId) {
  return request({
    url: '/system/order/' + oId,
    method: 'get'
  })
}

// 新增充电订单信息
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改充电订单信息
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除充电订单信息
export function delOrder(oId) {
  return request({
    url: '/system/order/' + oId,
    method: 'delete'
  })
}

// 获取今日充电度数
export function todayOrder() {
  return request({
    url: '/system/order/selectTodayc',
    method: 'get',
  })
}

// 获取今日充电次数
export function todayCountOrder() {
  return request({
    url: '/system/order/selectCountTodayc',
    method: 'get',
  })
}

// 获取昨天充电度数
export function yesterdayOrder() {
  return request({
    url: '/system/order/selectYesterdayc',
    method: 'get',
  })
}

// 获取昨天充电次数
export function yesterdayCountOrder() {
  return request({
    url: '/system/order/selectCountYesterdayc',
    method: 'get',
  })
}

// 获取本周充电度数
export function weekOrder() {
  return request({
    url: '/system/order/selectWeekc',
    method: 'get',
  })
}

// 获取本周充电次数
export function weekCountOrder() {
  return request({
    url: '/system/order/selectCountWeekc',
    method: 'get',
  })
}

// 获取上周充电度数
export function lastWeekOrder() {
  return request({
    url: '/system/order/selectLastWeekc',
    method: 'get',
  })
}

// 获取上周充电次数
export function lastWeekCountOrder() {
  return request({
    url: '/system/order/selectCountLastWeekc',
    method: 'get',
  })
}

// 获取本周充值金额
export function weekRechargeAmountOrder() {
  return request({
    url: '/system/rorder/selectWeekRechargeAmount',
    method: 'get',
  })
}

// 获取上周充值金额
export function lastWeekRechargeAmountOrder() {
  return request({
    url: '/system/rorder/selectLastWeekRechargeAmount',
    method: 'get',
  })
}

// 获取今日注册人数
export function todayRegisterCount() {
  return request({
    url: '/system/huiyuan/selectTodayRegisterCount',
    method: 'get',
  })
}

// 获取昨天注册人数
export function yesterdayRegisterCount() {
  return request({
    url: '/system/huiyuan/selectYesterdayRegisterCount',
    method: 'get',
  })
}

// 获取本周每日注册人数
export function weekRegisterCount() {
  return request({
    url: '/system/huiyuan/selectWeekRegisterCount',
    method: 'get',
  })
}

// 获取上周每日注册人数
export function lastWeekRegisterCount() {
  return request({
    url: '/system/huiyuan/selectLastWeekRegisterCount',
    method: 'get',
  })
}

// 获取上周每日注册人数
export function typePercentageOrder() {
  return request({
    url: '/system/order/selectTypePercentage',
    method: 'get',
  })
}

// 获取今日订单
export function todayAllOrder() {
  return request({
    url: '/system/order/selectTodayOrder',
    method: 'get',
  })
}
